home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
dev
/
m2
/
m2_part1.lha
/
modula
/
src
/
M2Lib.def
< prev
next >
Wrap
Text File
|
1994-07-30
|
2KB
|
47 lines
DEFINITION FOR C MODULE M2Lib ;
FROM SYSTEM IMPORT ADDRESS, STRING ;
VAR (* The following variables are READ ONLY!! *)
wbStarted : BOOLEAN ;
wbMsg : ADDRESS ; (* Startup message sent to us by workbench, *)
(* Do not reply to it, as the DICE exit code will *)
(* do this at the correct time. *)
(* wbMsg is only valid if wbStarted = TRUE *)
(* following are only valid if wbStarted = FALSE (CLI startup) *)
argc : LONGINT ; (* # of cmd line arguments eg [m2c x.mod] = 2 arguments *)
argv : POINTER TO ARRAY (* 0..argc-1 *) OF STRING ;
PROCEDURE OpenLib( name : STRING ; version : LONGINT ) : ADDRESS ;
(* Like the Exec version but the library is automatically closed at program *)
(* exit. *)
PROCEDURE _ErrorReq( s1,s2 : STRING ) ;
(* Displays an error requester with s1,s2 and then calls StdLib.exit(20) *)
(* dont pass NIL as either argument pass " " instead. *)
PROCEDURE CheckStack( needBytes : LONGINT ) ;
(* Checks that needBytes of space are avaiable on the stack. *)
(* calls _ErrorReq if there are not. *)
(* Used for manual stack checking. Place calls to this procedure in *)
(* the recursive call paths of your program. *)
(* If the check fails then this function sets the stack to a safer *)
(* value before the _ErrorReq call. *)
(* DO NOT use if youre program creates coroutines or Exec tasks *)
(* Duplicated from StdLib.def *)
TYPE
IntProc = PROCEDURE( ) : LONGINT ;
PROCEDURE onbreak( ip : IntProc ) : IntProc ;
PROCEDURE atexit( p : PROC ) ;
PROCEDURE exit( n : LONGINT ) ;
PROCEDURE malloc( size : LONGINT ) : ADDRESS ;
PROCEDURE free( a : ADDRESS ) ;
END M2Lib.